1. Field of the Invention
The present invention relates to an image processing method and apparatus for recovering a missing element of a predetermined structure, such as a face in an image or the like. It also relates to a computer readable recording medium including a program for causing a computer to perform the method.
2. Description of the Related Art
When taking photographs, there may be a case in which a photograph of main subject is obtained in partially shaded, depending on the imaging environment or the appearance of the subject. For example, if a person, the major subject, wearing a cap is imaged, the eyebrows or the eyes of the person may be shaded by the rim of the cap, and the eyebrows or the eyes of the person in the recorded image may become collapsed to dark. If a person, the major subject, standing over a net is imaged, the net pattern is superimposed on the face of the person in the recorded image.
Further, an excessively high contrast between the subject and the background may cause halation in the high signal region, or collapse in low signal region of the image.
Still further, if the subject is dark, or out of autofocus area, the resultant image may be blurred, that is, the image missing high-frequency component may be obtained.
In the mean time, a method for correcting digital images obtained by digital cameras or those obtained by scanning photograph prints by scanners is proposed as described, for example, Japanese Unexamined Patent Publication No. 8(1996)-065519. In the method, the center of a defective area of an image is specified by the user, and a predetermined surrounding region including the defective area is specified as a removal region. In addition, an interpolation region required for interpolating the removal region is specified in the surrounding area of the removal region. Then, the interpolation region is extended gradually and linearly toward the defective area to replace the pixels within the removal region with the pixels of the interpolation region, and thereby the defective area is removed and corrected.
The aforementioned method is an effective image correction method when a defective area (removal region) is readily replaced by the surrounding region (interpolation region), such as the region of the sky or the ocean. But, when an image component with a unique shape, such as an eye, a nose, a mouth, or the like, is masked by a shield, or having halation or collapse therein, it is impossible for the method to recover the masked component, since no identical component exists in the surrounding region. Further, it can not correct an image with a specific color image signal being lost, or a blurred image.